package cn.desk.commons.entity;

import java.util.List;

public class PageMode<T> {
	private Integer pageSize;
	private Integer currentPage;
	private Integer totalPage;
	private List<T> data;

	public Integer getPageSize() {
		return pageSize;
	}

	public void setPageSize(Integer pageSize) {
		this.pageSize = pageSize;
	}

	public Integer getCurrentPage() {
		return currentPage;
	}

	public void setCurrentPage(Integer currentPage) {
		this.currentPage = currentPage;
	}

	public Integer getTotalPage() {
		return totalPage;
	}

	public void setTotalPage(Integer totalPage) {
		this.totalPage = totalPage;
	}

	public List<T> getData() {
		return data;
	}

	public void setData(List<T> data) {
		this.data = data;
	}
	
	public Integer getStartRow(){
		return (getCurrentPage()-1)*getPageSize();
	}
	
	public Integer getEndRow(){
		return getCurrentPage()*getPageSize();
	}
	
}
